package xyz.penghaonan.p2plib.helper.message;

public class CmdRequestMsg extends BaseRequestMsg {
    public static final String EXTRA_ON_OFF = "on_off";

    private String cmd;

    public boolean isOn() {
        return data.getBoolean(EXTRA_ON_OFF);
    }

    public void setOnOff(boolean onOff) {
        data.putBoolean(EXTRA_ON_OFF, onOff);
    }

    @Override
    public int getType() {
        return MsgFactory.TYPE_CMD_REQUEST;
    }

    @Override
    public BaseResponseMsg createResponseMsg() {
        return new CmdResponseMsg(getId());
    }
}
